<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:rich="http://richfaces.org/rich">
<body>

<ui:composition template="/template/template.xhtml">

	<ui:define name="left">
		<h:panelGrid columns="1">
			<s:link view="/songList.xhtml" propagation="none">Song List</s:link>
			<s:link view="/artistForm.xhtml" propagation="none">Add artist</s:link>
		</h:panelGrid>
	</ui:define>

	<ui:define name="content">
		<h1>Artists</h1>

		<h:outputText value="Artist list is empty."
			rendered="#{empty artistList.resultList}" />

		<rich:dataTable id="artistList" var="artist"
			value="#{artistList.resultList}"
			rendered="#{not empty artistList.resultList}">
			<rich:column>
				<f:facet name="header">
					<f:verbatim>Name</f:verbatim>
				</f:facet>
				<s:link view="/artistDetails.xhtml" propagation="none">
					<f:param name="artistId" value="#{artist.id}" />
					<h:outputText value="#{artist.name}" />
				</s:link>

			</rich:column>
		</rich:dataTable>

	</ui:define>

</ui:composition>

</body>
</html>
